package com.slz3.business.module.memberManagement.userScoreRecord.domain;

import com.slz3.business.frame.functions.Add;
import com.slz3.business.frame.functions.Modify;
import com.slz3.business.frame.module.DomainEntity;
import com.slz3.business.module.memberManagement.memJifen.enums.MemJifenJifenStateFlag;
import com.slz3.business.module.memberManagement.memJifen.enums.MemJifenJifenTypeFlag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotNull;

@MappedSuperclass
@Data
@EqualsAndHashCode(callSuper = false)
public class UserScoreRecordEntity extends DomainEntity {


    /**
     * 编号
     */
    @Column(length = 80)
    @NotNull(message = "serNum 必须非空!", groups = {Add.class, Modify.class})
    @Length(min = 1, max = 80, message = "ser2 必须非空并且不超过 80 个字符!", groups = {Add.class, Modify.class})
    private String serNum;


    /**
     * 用户积分记录ID
     */
    private String id = "";

    /**
     * 积分来源
     */
    private String source = "";

    /**
     * 积分值
     */
    private String score;

    /**
     * 积分备注
     */
    private String remark;

    /**
     * 用户ID
     */
    private String userId;


    /**
     *  积分类型
     */
    private MemJifenJifenTypeFlag memJifenJifenTypeFlag ;


    /**
     * 积分状态
     */
    private MemJifenJifenStateFlag memJifenJifenStateFlag ;


    /**
     * 订单ID
     */
    private String orderId;

}
